import { Column, Entity, PrimaryColumn } from "typeorm";


@Entity({
    name: 'sso_user'
})
export class SsoUser {
    @PrimaryColumn()
    userId: string;

    @Column({ default: '' })
    email: string;

    @Column({ default: '' })
    username: string;

    @Column({ type: 'jsonb', nullable: true })
    authorities: any[];

    @Column({ default: true })
    accountNonLocked: boolean;

    @Column({ default: true })
    enabled: boolean;

    @Column({ default: true })
    credentialsNonExpired: boolean;

    @Column({ default: '' })
    clientId: string;

    @Column({ default: '' })
    domain: string;

    @Column({ default: '' })
    nickName: string;

    @Column({ default: '' })
    avatar: string;

    @Column({ default: '', nullable: true })
    ip: string;

    @Column({ default: '' })
    userDesc: string;

    @Column({ default: '' })
    accountId: string;

    @Column({ default: '' })
    accountType: string;

    @Column({ type: 'jsonb', nullable: true })
    attrs: any;

    @Column({ type: 'timestamp' })
    createTime: Date;

    @Column({ type: 'jsonb', nullable: true })
    currTenant: any;

    @Column({ type: 'jsonb', nullable: true })
    tenantInfo: any;

    @Column({ default: '' })
    openid: string;

}